package org.fujene.term;

import org.fujene.structure.Term;
import org.fujene.structure.TermList;

public class UnigramChopper implements Chopper {
	private static final String stopWord = " 　！!＄$％%’\'（(）)、,。.・／/￥\\；;：:「[{」]}＠@＜<＞>～~";

	@Override
	public TermList chop(String content) {
		TermList terms = new TermList(content.length());

		for (int i = 0; i < content.length() - 1; i++) {
			CharSequence subst = content.substring(i, i + 1);
			if (!stopWord.contains(subst)) {
				terms.add(new Term(subst.toString()));
			}
		}

		return terms;
	}

}
